home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1997 July
/
EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso
/
earcd
/
dev
/
amos
/
moreusel.lha
/
Gearwheel2.AMOS
/
Gearwheel2.amosSourceCode
Wrap
AMOS Source Code
|
1997-04-15
|
3KB
|
93 lines
Screen Open 1,320,256,2,0 : Screen Hide
Curs Off : Cls 0
Screen Open 0,320,256,4,0 : Screen To Front 1
Curs Off : Flash Off : Paper 0 : Pen 1 : Cls 0
Palette $0,$8F8,$484,$8F8
Double Buffer
Autoback 0
W=0
WX=0 : WY=256 : WZ=0 : ST= Extension_8_04F8(Rnd(3)+3) : ROT=1
Extension_8_1122 0,0,300
R1MX1=319 : R1MY1=255 : R1MX2=0 : R1MY2=0
R2MX1=319 : R2MY1=255 : R2MX2=0 : R2MY2=0
A1MX1=319 : A1MY1=255 : A1MX2=0 : A1MY2=0
A2MX1=319 : A2MY1=255 : A2MX2=0 : A2MY2=0
Do
Extension_8_121C 0,0,R2MX1,R2MY1 To R2MX2+1,R2MY2+1
Add W,6
Add WX,3
Add WY,6
Add WZ,9
Extension_8_1138 WX,WY,WZ
Extension_8_1152
Extension_8_121C 0,1,A2MX1,A2MY1 To A2MX2+1,A2MY2+1
D=0 : RX1=0
Z1= Extension_8_11C4(0,0,100) : Z2= Extension_8_11C4(0,0,-100)
If Z1>Z2 Then SI=0 : Z=Z1 Else SI=1 : Z=Z2
R2MX1=R1MX1 : R2MY1=R1MY1 : R2MX2=R1MX2 : R2MY2=R1MY2
R1MX1=319 : R1MY1=255 : R1MX2=0 : R1MY2=0
A2MX1=A1MX1 : A2MY1=A1MY1 : A2MX2=A1MX2 : A2MY2=A1MY2
A1MX1=319 : A1MY1=255 : A1MX2=0 : A1MY2=0
For A=0 To 1023 Step ST
If D<2
X2= Extension_8_1114(A+W+(D and 1)*ST-(ST/2),96-ST)
Y2= Extension_8_1106(A+W+(D and 1)*ST-(ST/2),96-ST)
Else
X2= Extension_8_1114(A+W,96)
Y2= Extension_8_1106(A+W,96)
End If
RX2= Extension_8_1168(X2,Y2,10)+160
RY2= Extension_8_1184 +128
RX4= Extension_8_1168(X2,Y2,-10)+160
RY4= Extension_8_1184 +128
Add D,1,0 To 3
If RX1=0
OX1=RX2 : OY1=RY2 : OX3=RX4 : OY3=RY4
Else
Gosub DRAPOINT
End If
RX1=RX2 : RY1=RY2 : RX3=RX4 : RY3=RY4
Next
RX2=OX1 : RY2=OY1 : RX4=OX3 : RY4=OY3
Gosub DRAPOINT
Extension_8_1042 0,0,R1MX1,R1MY1,R1MX2+1,R1MY2+1
Screen Swap
Wait Vbl
C=(Z-300)/7
Colour 1,C*$110
Colour 3,C*$110
Colour 2,(15-C)*$10
Loop
DRAPOINT:
Screen 1
MX1=Min(Min(Min(RX1,RX2),RX3),RX4)
A1MX1=Min(A1MX1,MX1)
Extension_8_1016 RX1,RY1 To RX2,RY2,1,-1
MX2=Max(Max(Max(RX1,RX2),RX3),RX4)
A1MX2=Max(A1MX2,MX2)
Extension_8_1016 RX2,RY2 To RX4,RY4,1,-1
MY1=Min(Min(Min(RY1,RY2),RY3),RY4)
A1MY1=Min(A1MY1,MY1)
Extension_8_1016 RX3,RY3 To RX4,RY4,1,-1
MY2=Max(Max(Max(RY1,RY2),RY3),RY4)
A1MY2=Max(A1MY2,MY2)
Extension_8_1016 RX1,RY1 To RX3,RY3,1,-1
Extension_8_1042 1,0,MX1,MY1,MX2+1,MY2+1
Extension_8_128A MX1,MY1 To MX2+1,MY2+1
Extension_8_12B2 1,0,0,1 To 0,1,%11111100
Extension_8_121C 1,0,MX1,MY1 To MX2+1,MY2+1
Screen 0
If SI
R1MX1=Min(Min(R1MX1,RX1),RX2)
R1MY1=Min(Min(R1MY1,RY1),RY2)
R1MX2=Max(Max(R1MX2,RX1),RX2)
R1MY2=Max(Max(R1MY2,RY1),RY2)
Extension_8_1016 RX1,RY1 To RX2,RY2,1,-1
Else
R1MX1=Min(Min(R1MX1,RX3),RX4)
R1MY1=Min(Min(R1MY1,RY3),RY4)
R1MX2=Max(Max(R1MX2,RX3),RX4)
R1MY2=Max(Max(R1MY2,RY3),RY4)
Extension_8_1016 RX3,RY3 To RX4,RY4,1,-1
End If
Return